package tree;

/**演示递归*/
  public class RecursionDemo {
 /**
   * 计算
   *
   */

 public static int f(int n){
     if (n==1){
         return 1;
     }
     return n * f(n-1);
 }

    public static void main(String[] args) {
        int rs = f(5);
        System.out.println(rs);
    }
}
